package com.joker.service;

import com.joker.entity.ChatSession;
import com.joker.entity.SessionAndUser;

import java.util.List;

/**
 * <p>
 * 会话表 服务类
 * </p>
 *
 * @author joker
 * @since 2021-06-03
 */
public interface ChatSessionService {
    public ChatSession findBySessionId(int sessionId);
    public List<ChatSession> findByUserId(String userId);
    public List<SessionAndUser> findAllByUserId(String userId);
    public ChatSession findByUserIdAndToUserId(String userId,String toUserId);
    public Integer save(ChatSession chatSession);
    public Integer setUnReadCount(String userId,String toUserId);
    public Integer deleteById(int sessionId);
    public void addUnReadCountByUserIdAndToUserId(String userId,String toUserId);
}
